<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="Content-Type" content="multipart/form-data; charset=utf-8" />
    <title>灵感库</title>
    <link rel="stylesheet" type="text/css" href="css/z-UI.tab.css"/>
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript" src="js/jquery-table/jquery.table.js"></script>
    <link rel="stylesheet" href="js/jquery-table/css/jquery-table-default.css" />
    <script type="text/javascript" src="js/jquery-table/jsrender.js"></script>
    <script type="text/javascript" src="layui/layui.js"></script>

    <style>
		html,body{
            width: 100%;height: 100%;
            margin:0;background-color: white;
        }
        .zUI-bar .content .wrap { padding: 10px }
        .button { padding: 2px 10px; }
        .zUI-bar input{ padding: 5px  }
        .oneCategoryText { display: inline-block; padding: 10px 20px;background-color: #dfd8bc;margin-right: 10px;font-size: 15px;     border-style: solid; border-width: 0px; }
        .oneCategoryDiv { padding: 20px 10px;  }

        .twoCategoryDiv {      padding: 20px 10px;  }
        .twoCategoryText { padding: 3px 10px;background-color: #e8e8e8;margin-right: 6px;font-size: 14px; border-style: solid; border-width: 0px; }
        .contentItem { padding: 10px 20px; border: 1px #000 solid; border-radius: 5px;width: 100%; max-height: 200px;     margin: 10px 0px; background-color: #ffffec; font-size: 12px }

        .tagSpan{     display: inline-block; margin-top: 5px; font-size: 14px;   background-color: #e8e8e8;padding: 3px 8px;margin-left: 5px;   border-style: solid; border-width: 0px;}

        .contentText{ font-size: 16px; border: 1px #000 solid; border-radius: 5px;padding: 5px  10px;     overflow: hidden; max-height: 115px; }

        .contentTagSpan, .contentCategorySpan:hover{ background-color: #dbdbdb; }
        .contentButton { margin-top: 10px }
        .contentDesc { padding: 0px  10px 5px 5px }
        .selectCategoryDiv {  padding: 20px 10px; border: 1px #000 solid;}
        .selectCategoryText { padding: 3px 10px;background-color: #e8e8e8;margin-right: 6px;font-size: 14px;border-style: solid;border-width: 0px; }

        .contentCategorySpan { margin-right: 15px; }
        span.tip { font-size: 12px; }
        #contenList .datatable .datatable-pager{     position: fixed;bottom: 0;width: 100%;background-color: #ffffff; }

        #previewDiv img{ max-width: 100% }
    </style>

</head>
<body  >
    <div style="width: 100%;box-sizing: border-box;padding: 30px;display: inline-flex">
        <div style="margin: 5px;">
            <div class="zUI-bar line md" id="tab1">
                <div class="bar-box">
                    <div class="nav active"  onclick="location.href = '/index.html'">
                        内容展示
                    </div>
                    <div class="nav " onclick="location.href = '/tag.html'">
                        标签管理
                    </div>
                    <div class="nav" onclick="location.href = '/category.html'">
                        分类管理
                    </div>
                    <div class="nav" onclick="location.href = '/content.html'">
                        内容管理
                    </div>
                    <div class="nav" onclick="location.href = '/system.html'">
                        系统管理
                    </div>
                </div>
                <div class="content" id="catagoryDiv">
                    <div>
                        <p style="padding: 10px; margin-bottom: 10px;">
                            <span>内容个数：<span id="contentNum"></span></span><br/>
                            <span>标签个数：<span id="tagNum"></span></span><br/>
                            <span>分类个数：<span id="categoryNum"></span></span><br/>
                        </p>
                    </div>

                    <div style="margin-bottom: 10px;">
                        <h3>分类选择</h3>
                        <span class="tip">双击二级标签选中</span>

                        <div  class="oneCategoryDiv">
                        </div>

                        <div  class="twoCategoryDiv">
                        </div>


                        <div  class="selectCategoryDiv">
                        </div>
                        <button onclick="$('.selectCategoryText[isSelect=\'true\']').remove()" >删除</button>
                        <button onclick="$('.selectCategoryDiv').html('');">清空标签</button>
                    </div>

                    <div>
                        <h3>标签</h3>
                        <div>
                            <label>
                                标签筛选关系:
                                <select id="tIdsOperation">
                                    <option value="and">and</option>
                                    <option value="or">or</option>
                                </select>
                            </label>
                            <div id="tagSearchDiv" style="    padding: 20px 10px; border: 1px #000 solid;">
                            </div>
                            <button onclick="searchTagOpen()">搜索标签</button>
                            <button onclick="$('.tagSpan[isSelect=\'true\']').remove()" >删除</button>
                            <button onclick="$('#tagSearchDiv').html('');">清空标签</button>
                        </div>
                    </div>

                    <div>
                        <h3 style="padding: 20px 0px;">内容</h3>
                        <p>
                            <input type="text" id="cName" placeholder="输入搜索内容关键字">
                            <button onclick="searchContent()">搜索</button>
                        </p>
                        <div id="contenList">
                            没有数据

                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>


</body>

<script type="text/javascript" src="js/index.js"></script>

<script id="tag_span_template" type="text/x-jsrender">
    <span class="tagSpan" tId="{{>t_id }}">{{>t_name }}</span>
</script>

<script id="context_template" type="text/x-jsrender">
    <div class="contentItem">
        <div class="contentDesc">{{>c_id }}. {{:c_desc }}</div>
        <div class="contentText" ondblclick="previewContent({{>c_id }})">
            {{: c_name }}
        </div>
        <div class="contentButton">
            <p>
                标签：
                {{for tagList}}
                    <span class="contentTagSpan" t_name="{{:#data.t_name }}"
                            t_id="{{:#data.t_id }}"  >{{:#data.t_name }}</span>
                {{/for}}
            </p>
            <p>
                分类：
                {{for categoryList}}
                    <span class="contentCategorySpan" c_name="{{:#data.c_name }}" c_id="{{:#data.c_id }}" class="contentTagCategroy">
                    {{:#data.c_desc }}>{{:#data.c_name }}
                    </span>
                {{/for}}
            </p>
        </div>
    </div>
</script>
</html>